﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dal;
using Model;

namespace Bll
{
    public class OrderBll
    {
        OrderDal dal = new OrderDal();

        #region 显示订单
        /// <summary>
        /// 显示订单
        /// </summary>
        /// <returns></returns>
        public List<Order> ShowOrder(int id)
        {
            return dal.ShowOrder(id);

        }

        #endregion

        #region 添加订单
        /// <summary>
        /// 添加订单
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public int AddOrder(Order n,int carid)
        {
            return dal.AddOrder(n, carid);
        }

        #endregion

        #region 修改订单
        /// <summary>
        /// 修改订单
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public int UptOrder(Order n)
        {
            return dal.UptOrder(n);
        }

        #endregion

        #region 删除订单信息
        /// <summary>
        /// 删除订单信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelOrder(string id)
        {
            return dal.DelOrder(id);
        }
        #endregion

        #region 添加订单备注
        /// <summary>
        /// 添加订单备注
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public int AddAdvice(string advice, string email, int Userid)
        {
            return dal.AddAdvice(advice,email,Userid);

        }
        #endregion

        #region 清空订单
        /// <summary>
        /// 清空订单
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        public int empty(int id)
        {
            return dal.empty(id);
        }
        #endregion

    }
}
